<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>首页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
    <script language="javascript" type="text/javascript">
        var swf_width = 280;
        var swf_height = 240;
        //图片轮换播放器：bcastr3.swf
        //文字颜色|文字位置|文字背景颜色|文字背景透明度|按键文字颜色|按键默认颜色|按键当前颜色|自动播放时间|图片过渡效果|是否显示按钮|打开方式
        var configtg = '0xffffff|1|0xaf3c3c|6|0xffffff|0xC5DDBC|0x000033|4|3|1|_blank';
        var files = '';
        var links = '';
        var texts = '';
        <s:iterator id="picnews" value="#attr.picnewss" status="row">
        files += '<s:property value="#picnews.picnews_picture" />';
        links = links + 'page_getPicnews.action?paramsPicnews.picnews_id=<s:property value="#picnews.picnews_id"/>';
        <s:if test="#picnews.picnews_title.length()>22">
        texts += '<s:property value="#picnews.picnews_title.substring(0,22)" />...';
        </s:if>
        <s:else>
        texts += '<s:property value="#picnews.picnews_title" />';
        </s:else>

        <s:if test="!#row.last">
        files += '|';
        links += '|';
        texts += '|';
        </s:if>
        </s:iterator>

        function playit() {
            document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + swf_width + '" height="' + swf_height + '">');
            document.write('<param name="movie" value="images/hdtp/bcastr3.swf"><param name="quality" value="high">');
            document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
            document.write('<param name="FlashVars" value="bcastr_file=' + files + '&bcastr_link=' + links + '&bcastr_title=' + texts + '&bcastr_config=' + configtg + '">');
            document.write('<embed src="images/hdtp/bcastr3.swf" wmode="opaque" FlashVars="bcastr_file=' + files + '&bcastr_link=' + links + '&bcastr_title=' + texts + '&bcastr_config=' + configtg + '&menu="false" quality="high" width="' + swf_width + '" height="' + swf_height + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
            document.write('</object>');
        }

    </script>

    <style type="text/css">
        body, td, div {
            font-size: 12px;
        }
    </style>
</head>
<body>
<jsp:include page="top.jsp"></jsp:include>
<div id="middle">
    <div id="middle_left">
        <div id="picnews">
            <img src="images/menkou.jpg" width="280" height="240">
        </div>
        <div id="info">
            <div class="titleBg">最新资讯</div>
            <div class="info_con">
                <ul>
                    <s:iterator value="#attr.infoss1" id="infos1">
                        <li>
                            <div>
                                <div class="info_text">
                                    <s:a href="page_getInfos.action?paramsInfos.info_type=1&paramsInfos.info_id=%{#infos1.info_id}"
                                         target="_blank" title="%{#infos1.info_title}">
                                        <s:property
                                                value="#infos1.info_title.length()>24?#infos1.info_title.substring(0,22)+'...':#infos1.info_title"/>
                                    </s:a>
                                </div>
                                <div class="info_time">[<s:property value="#infos1.info_time.substring(0,10)"/>]</div>
                            </div>
                        </li>
                    </s:iterator>
                </ul>
            </div>
        </div>
        <div id="school">
            <div class="titleBg">校园风光</div>
            <div class="school_con" id="school_con">
                <ul>
                    <li>
                        <img src="images/xyfg/1.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/2.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/3.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/4.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/5.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/6.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/7.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/8.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/9.jpg" width="210" height="190">
                    </li>
                    <li>
                        <img src="images/xyfg/10.jpg" width="210" height="190">
                    </li>
                </ul>
            </div>
            <script type="text/javascript">
                //滚动插件
                (function ($) {
                    $.fn.extend({
                        ScrollLeft: function (opt, callback) {
                            //参数初始化
                            if (!opt) var opt = {};
                            var _this = this.eq(0).find("ul:first");
                            var colW = _this.find("li:first").width(), //获取行宽
                                col = opt.col ? parseInt(opt.col, 3) : parseInt(this.width() / colW, 3), //每次滚动的行数，默认为一屏，即父容器高度
                                speed = opt.speed ? parseInt(opt.speed, 10) : 500, //卷动速度，数值越大，速度越慢（毫秒）
                                timer = opt.timer ? parseInt(opt.timer, 10) : 3000; //滚动的时间间隔（毫秒）
                            if (col == 0) col = 3;
                            var leftWidth = 0 - col * colW - 20;
                            //滚动函数
                            scrollLeft = function () {
                                _this.animate({
                                    marginLeft: leftWidth
                                }, speed, function () {
                                    for (i = 1; i <= col; i++) {
                                        _this.find("li:first").appendTo(_this);
                                    }
                                    _this.css({marginLeft: 0});
                                });
                            }
                            //鼠标事件绑定
                            _this.hover(function () {
                                clearInterval(timerID);
                            }, function () {
                                timerID = setInterval("scrollLeft()", timer);
                            }).mouseout();
                        }
                    });
                })(jQuery);

                $(document).ready(function () {
                    $("#school_con").ScrollLeft({col: 1, speed: 1000, timer: 3000});
                });
            </script>
        </div>
        <div class="infos1">
            <div class="titleBg2">
                <div class="titleBg_text">学术动态</div>
                <div class="titleBg_more"><a href="page_listInfoss.action?paramsInfos.info_type=2" target="_blank">More>></a>
                </div>
            </div>
            <div class="infos_con">
                <ul>
                    <s:iterator value="#attr.infoss2" id="infos2">
                        <li>
                            <s:property value="#infos2.info_time.substring(0,10)"/>&nbsp;
                            <s:a href="page_getInfos.action?paramsInfos.info_type=2&paramsInfos.info_id=%{#infos2.info_id}"
                                 target="_blank" title="%{#infos2.info_title}">
                                <s:property
                                        value="#infos2.info_title.length()>18?#infos2.info_title.substring(0,18)+'...':#infos2.info_title"/>
                            </s:a>
                        </li>
                    </s:iterator>
                </ul>
            </div>
        </div>
        <div class="infos2">
            <div class="titleBg2">
                <div class="titleBg_text">奖励资助</div>
                <div class="titleBg_more"><a href="page_listInfoss.action?paramsInfos.info_type=3" target="_blank">More>></a>
                </div>
            </div>
            <div class="infos_con">
                <ul>
                    <s:iterator value="#attr.infoss3" id="infos3">
                        <li>
                            <s:property value="#infos3.info_time.substring(0,10)"/>&nbsp;
                            <s:a href="page_getInfos.action?paramsInfos.info_type=3&paramsInfos.info_id=%{#infos3.info_id}"
                                 target="_blank" title="%{#infos3.info_title}">
                                <s:property
                                        value="#infos3.info_title.length()>18?#infos3.info_title.substring(0,18)+'...':#infos3.info_title"/>
                            </s:a>
                        </li>
                    </s:iterator>
                </ul>
            </div>
        </div>
        <div class="infos2">
            <div class="titleBg2">
                <div class="titleBg_text">新闻评论</div>
                <div class="titleBg_more"><a href="page_listComments.action" target="_blank">More>></a></div>
            </div>
            <div class="infos_con">
                <ul>
                    <s:iterator value="#attr.comments" id="comment">
                        <li>
                            <s:property value="#comment.comment_date.substring(0,10)"/>&nbsp;
                            <s:a href="page_getComment.action?paramsComment.comment_id=%{#comment.comment_id}"
                                 target="_blank" title="%{#comment.comment_title}">
                                <s:property
                                        value="#comment.comment_title.length()>18?#comment.comment_title.substring(0,18)+'...':#comment.comment_title"/>
                            </s:a>
                        </li>
                    </s:iterator>
                </ul>
            </div>
        </div>
    </div>
    <div id="middle_right">
        <div id="note">
            <div class="titleBg">活动公告</div>
            <div class="note_con" id="note_con">
                <ul>
                    <s:iterator value="#attr.notes" id="note">
                        <li>
                            <s:a href="page_getNote.action?paramsNote.note_id=%{#note.note_id}" target="_blank"
                                 title='%{#note.note_title}'>
                                <s:property value="#note.note_title"/>
                            </s:a>
                        </li>
                    </s:iterator>
                </ul>
            </div>
            <script type="text/javascript">
                //滚动插件
                (function ($) {
                    $.fn.extend({
                        Scroll: function (opt, callback) {
                            //参数初始化
                            if (!opt) var opt = {};
                            var _this = this.eq(0).find("ul:first");
                            var lineH = _this.find("li:first").height(), //获取行高
                                line = opt.line ? parseInt(opt.line, 10) : parseInt(this.height() / lineH, 10), //每次滚动的行数，默认为一屏，即父容器高度
                                speed = opt.speed ? parseInt(opt.speed, 10) : 500, //卷动速度，数值越大，速度越慢（毫秒）
                                timer = opt.timer ? parseInt(opt.timer, 10) : 3000; //滚动的时间间隔（毫秒）
                            if (line == 0) line = 1;
                            var upHeight = 0 - line * lineH;
                            //滚动函数
                            scrollUp = function () {
                                _this.animate({
                                    marginTop: upHeight
                                }, speed, function () {
                                    for (i = 1; i <= line; i++) {
                                        _this.find("li:first").appendTo(_this);
                                    }
                                    _this.css({marginTop: 0});
                                });
                            }
                            //鼠标事件绑定
                            _this.hover(function () {
                                clearInterval(timerID);
                            }, function () {
                                timerID = setInterval("scrollUp()", timer);
                            }).mouseout();
                        }
                    });
                })(jQuery);

                $(document).ready(function () {
                    $("#note_con").Scroll({line: 1, speed: 500, timer: 4000});
                });
            </script>
        </div>
        <div id="friendlink">
            <div class="titleBg">联系我们</div>
            <div class="friendlink_con">
                <!--   地址：河北省石家庄市裕华东路70号
                                       邮编：050018
                                       电话：0311-88632211
                                       传真：0311-88632209
                                       邮箱：zx_hbklg@163.com -->
                <p>地址：河北省石家庄市裕华东路70号</p>
                <p>邮编：050018 </p>
                <p>电话：0311-88632211 </p>
                <p>传真：0311-88632209 </p>
                <p>邮箱：zx_hbklg@163.com</p>
            </div>
        </div>
    </div>
</div>
<jsp:include page="bottom.jsp"></jsp:include><!--
</body>
</html>